home *** CD-ROM | disk | FTP | other *** search
/ FDR / FDR.iso / DATA / 16_1.Dxr / 00002_Overview Main.ls < prev    next >
Encoding:
Text File  |  1996-10-22  |  5.2 KB  |  200 lines

  1. global vOpt, vSOpt, vFOpt, vVoid, vHFlag19, vHFlag47, vHFlag48, vThreadRect, vYearList, vChronList, vForList, vNatList, vFdrList, vErList, vAmList
  2.  
  3. on OverViewHilight
  4.   set mLoc to point(the mouseH, the mouseV)
  5.   if inside(mLoc, rect(290, 0, 445, 135)) then
  6.     threads(mLoc)
  7.   else
  8.     if inside(mLoc, rect(0, 135, 640, 450)) then
  9.       cellHilight(mLoc)
  10.     else
  11.       if inside(mLoc, rect(130, 450, 510, 480)) then
  12.         SBArrowHilight(mLoc)
  13.       end if
  14.     end if
  15.   end if
  16. end
  17.  
  18. on overviewDown
  19.   set cLoc to the clickLoc
  20.   set cOn to the clickOn
  21.   if inside(cLoc, rect(0, 135, 640, 450)) then
  22.     cellDown(cOn)
  23.   else
  24.     if inside(cLoc, rect(130, 450, 510, 480)) then
  25.       SBDown(cLoc)
  26.     end if
  27.   end if
  28. end
  29.  
  30. on SBDown cLoc
  31.   set sbRects to value(the text of field "sbRects")
  32.   set maxCtr to count(sbRects)
  33.   repeat with ctr = 1 to maxCtr
  34.     set rct to getAt(getAt(sbRects, ctr), 1)
  35.     set lbl to getAt(getAt(sbRects, ctr), 2)
  36.     if inside(cLoc, rct) and (label(lbl) <> the frame) then
  37.       clickWait()
  38.       if inside(point(the mouseH, the mouseV), rct) then
  39.         setCursor(4)
  40.         go(lbl)
  41.         moveSprite(17, point(162 + ((the frame - 1) * 16), the locV of sprite 17), 1)
  42.         thumbYear()
  43.         set vFOpt to the frame
  44.         setCursor(0)
  45.       end if
  46.       abort()
  47.     end if
  48.   end repeat
  49. end
  50.  
  51. on cellHilight mLoc
  52.   repeat with ctr = 19 to 44
  53.     if rollOver(ctr) then
  54.       if vHFlag19 = ("c" & ctr) then
  55.         abort()
  56.       end if
  57.       set whichCell to the name of member the memberNum of sprite ctr
  58.       delete char -30000 of whichCell
  59.       set thd to getAt(getAt(vChronList, value(whichCell)), 2)
  60.       hideMovieHilights()
  61.       set the visible of sprite ctr to 1
  62.       showThreads(thd)
  63.       showPrev("pic" & vOpt & "," & whichCell & ",1")
  64.       hideHilights([47, 48])
  65.       set vHFlag19 to "c" & ctr
  66.       abort()
  67.     end if
  68.   end repeat
  69. end
  70.  
  71. on cellDown cLoc
  72.   repeat with ctr = 19 to 44
  73.     if cLoc = ctr then
  74.       clickWait()
  75.       if inside(point(the mouseH, the mouseV), the rect of sprite ctr) then
  76.         setCursor(4)
  77.         set whichCell to the name of member the memberNum of sprite ctr
  78.         delete char -30000 of whichCell
  79.         do("doOpt16(value(whichCell), 1)")
  80.         set the visible of sprite ctr to 0
  81.       end if
  82.       abort()
  83.     end if
  84.   end repeat
  85. end
  86.  
  87. on SBArrowHilight mLoc
  88.   if inside(mLoc, rect(133, 451, 146, 480)) and (the frame <> label("1896")) then
  89.     if vHFlag48 <> "lArrow" then
  90.       showSprite(48, "sbLeftH", point(139, 465), 0)
  91.       hideHilights([47, 46])
  92.       hideMovieHilights()
  93.       set vHFlag48 to "lArrow"
  94.     end if
  95.     abort()
  96.   else
  97.     if inside(mLoc, rect(403, 451, 416, 480)) and (the frame <> label("1953")) then
  98.       if vHFlag48 <> "rArrow" then
  99.         showSprite(48, "sbRightH", point(409, 465), 0)
  100.         hideHilights([47, 46])
  101.         hideMovieHilights()
  102.         set vHFlag48 to "rArrow"
  103.       end if
  104.       abort()
  105.     end if
  106.   end if
  107. end
  108.  
  109. on thumbYear
  110.   set maxCtr to count(vYearList)
  111.   repeat with ctr = 1 to maxCtr
  112.     set x to getAt(getAt(vYearList, ctr), 1)
  113.     set y to getAt(getAt(vYearList, ctr), 2)
  114.     if (the left of sprite 17 >= x) and (the left of sprite 17 <= y) then
  115.       set s to getAt(getAt(vYearList, ctr), 3)
  116.       swapSprite(17, s, 1)
  117.       exit repeat
  118.     end if
  119.   end repeat
  120. end
  121.  
  122. on threads mLoc
  123.   repeat with ctr = 7 to 11
  124.     if rollOver(ctr) then
  125.       if vHFlag19 = ("c" & ctr) then
  126.         abort()
  127.       end if
  128.       hideMovieHilights()
  129.       hideHilights([46, 47])
  130.       case ctr of
  131.         7:
  132.           showThreads([1])
  133.           set thdLst to getAt(vForList, the frame)
  134.         8:
  135.           showThreads([2])
  136.           set thdLst to getAt(vNatList, the frame)
  137.         9:
  138.           showThreads([3])
  139.           set thdLst to getAt(vFdrList, the frame)
  140.         10:
  141.           showThreads([4])
  142.           set thdLst to getAt(vErList, the frame)
  143.         11:
  144.           showThreads([5])
  145.           set thdLst to getAt(vAmList, the frame)
  146.       end case
  147.       set maxCtr2 to count(thdLst)
  148.       repeat with ctr2 = 1 to maxCtr2
  149.         set whichCell to getAt(thdLst, ctr2)
  150.         repeat with ctr3 = 19 to 44
  151.           if the name of member the memberNum of sprite ctr3 = (whichCell & "H") then
  152.             set the visible of sprite ctr3 to 1
  153.             exit repeat
  154.           end if
  155.         end repeat
  156.       end repeat
  157.       updateStage()
  158.       set vHFlag19 to "c" & ctr
  159.       abort()
  160.     end if
  161.   end repeat
  162.   if vHFlag19 <> 0 then
  163.     swapSprite(7, "For", 0)
  164.     swapSprite(8, "Nat", 0)
  165.     swapSprite(9, "FDR", 0)
  166.     swapSprite(10, "ER", 0)
  167.     swapSprite(11, "Am", 0)
  168.     repeat with x = 19 to 44
  169.       set the visible of sprite x to 0
  170.     end repeat
  171.     updateStage()
  172.     set vHFlag19 to vVoid
  173.   end if
  174. end
  175.  
  176. on showThreads threadList
  177.   set maxCtr to count(threadList)
  178.   repeat with ctr = 1 to maxCtr
  179.     if getAt(threadList, ctr) = 1 then
  180.       swapSprite(7, "hFor", 0)
  181.       next repeat
  182.     end if
  183.     if getAt(threadList, ctr) = 2 then
  184.       swapSprite(8, "hNat", 0)
  185.       next repeat
  186.     end if
  187.     if getAt(threadList, ctr) = 3 then
  188.       swapSprite(9, "hFDR", 0)
  189.       next repeat
  190.     end if
  191.     if getAt(threadList, ctr) = 4 then
  192.       swapSprite(10, "hER", 0)
  193.       next repeat
  194.     end if
  195.     if getAt(threadList, ctr) = 5 then
  196.       swapSprite(11, "hAm", 0)
  197.     end if
  198.   end repeat
  199. end
  200.